package cn.zhaozhiqi.service.impl;

import cn.zhaozhiqi.domain.Teacher;
import cn.zhaozhiqi.mapper.TeacherMapper;
import cn.zhaozhiqi.service.ITeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class TeacherServiceImpl implements ITeacherService {
    @Autowired
    private TeacherMapper teacherMapper;
    @Override
    public List<Teacher> getAll() {
        List<Teacher> list = teacherMapper.getAll();
        return list;
    }

    @Override
    public void insert(Teacher teacher) {
        teacherMapper.insert(teacher);
    }

    @Override
    public void update(Teacher teacher) {
        teacherMapper.update(teacher);
    }



    @Override
    public void deleteById(Long id) {
        teacherMapper.deleteById(id);
    }


    @Override
    public void addAllTeacher(List<Teacher> teachers) {
        teacherMapper.addAllTeacher(teachers);
    }
}
